import { createApp } from 'vue'
import {createPinia} from 'pinia'
import App from './App.vue'
import router from "./router";
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ELIcons from '@element-plus/icons-vue'
import store from './Store';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import * as AnIcons from '@ant-design/icons-vue'
import axios from "axios";
import lazy from '@/Lazy.js'


axios.defaults.withCredentials = true;
const app=createApp(App)
const pinia=createPinia()


app.use(lazy)
app.use(router)
app.use(ElementPlus)
app.use(store)
app.use(pinia)
app.use(Antd)
app.directive('focus',{
    mounted(el){
        el.focus()
    }
})

for (let iconName in ELIcons) {
    app.component(iconName, ELIcons[iconName])
}

for (const i in AnIcons) {
  app.component(i,AnIcons[i])
}
app.mount('#app')


